package org.liang.controller;

import org.liang.service.IVerifyCodeService;
import org.liang.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/verifyCode")
public class VerifyCodeController {

    @Autowired
    private IVerifyCodeService verifyCodeService;

    //发送注册验证码
    @GetMapping("/register/sendSms/{phone}")
    public AjaxResult userRegisterSendSms(@PathVariable("phone")String phone){
        verifyCodeService.userRegisterSendSms(phone);
        return AjaxResult.success();
    }
}
